//
//  TableCellModel.swift
//  CooperSwift
//
//  Created by 计海峰 on 2022/9/21.
//

import Foundation
import UIKit
import RxSwift
import RxDataSources

/// cell 公共cell model 相当于 row
open class TableCellModel: NSObject, TableCellConfigProtocol, BindKeyProtocol {
    
    required public init(_ model: Any?) { }
    
    /// 默认
    public var model: Any?
    
    var cellClass: UITableViewCell.Type?
    
    //  MARK: - 基础实现
    required public init(_ cellCls: UITableViewCell.Type,  _ model: Any? = nil) {
        super.init()
        self.cellClass = cellCls
        self.model = model
    }
    
    public func cellCls() -> UITableViewCell.Type {
        return self.cellClass.self ?? UITableViewCell.self
    }
    
}
